# -*- encoding: utf-8 -*-
"""
PyCharm main
2022年09月10日
by littlefean
"""

import itertools
import random
from typing import *

from stage import Stage
from div import Div
from animation import Ani
from random import randint, random


def main():
    stage = Stage()  # 生成了一个html文件
    stage.backgroundColor = "black"

    for _ in range(1000):
        ball = Div()  # 生成一个div东西
        ball.borderRadius = .5
        ball.backgroundColor = (random() * 255, 0, 0, .2)
        ball.animationDelay = random() * 2
        ball.addAni("left", random(), random() * 5)
        ball.addAni("top", random(), random() * 5)
        stage.addDiv(ball)

    stage.save()  # 把这个html文件保存出来

    return None


if __name__ == "__main__":
    main()
